//3038.相同分数的最大操作数目I
//https://leetcode.cn/problems/maximum-number-of-operations-with-the-same-score-i
class Solution {
public:
    int maxOperations(vector<int>& nums) {
        int n = nums.size();
        int num = nums[0]+nums[1];
        int ret = 0;
        for(int i = 1;i<n && nums[i]+nums[i-1] == num;i += 2) ++ret;

        return ret;
    }
};